package com.wjf.ks_test.vo;

/**
 * @author 吴建飞
 * @version 1.0
 * @since 2024/11/11
 */
public class Circle {
    private Vertex center;
    private double radius;

    public Circle(Vertex center, double radius) {
        this.center = center;
        this.radius = radius;
    }


    /**
     * 在图形窗口绘制圆形（这里简单打印）
     */
    public void draw() {
        System.out.println("绘制圆形");
    }
    /**
     * 计算圆形面积
     * @return 面积
     */
    public double calcArea() {
        return Math.PI * radius * radius;
    }

    public Vertex getCenter() {
        return center;
    }

    public double getRadius() {
        return radius;
    }
}
